<?php


namespace App\Http;


trait Response
{
   public function error($code,$message)
   {
      return response()->json(['code'=>$code,
          'message'=>$message]);
   }
   public function success($code,$data)
   {
       return response()->json(['code'=>$code,
           'data'=>$data]);
   }
   public function message($code,$message)
   {
       return response()->json(['code'=>$code,
           'message'=>$message]);
   }
}
